<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                <p>碎片越大，越影响MYSQL性能,如果表碎片过大,可以优化来整理该碎片。</p>
</div>
<div class="panel-body">
<div class="panel-tool">
<div class="row">
              <div class="col-xs-12 mb15">
                <div id="toolbar" class="toolbar">
 <a href="{:url('index',array('type'=>'export'))}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a>
                <a id="export" class="btn btn-success btn-disabled btn-add disabled" href="javascript:;" autocomplete="off"><i class="fa fa-floppy-o"></i> 立即备份</a> 
 
                <a href="{:url('index',array('type'=>'import'))}" class="btn btn-info"><i class="fa fa-stop-circle-o"></i> 数据还原</a> 
                <a  href="{:url('repair')}" form="#export-form" class="confirm btn btn-warning btn-disabled ajax-post disabled"><i class="fa fa-exclamation-circle"></i> 修复表</a> 
                <a  href="{:url('optimize')}" form="#export-form" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-futbol-o"></i> 优化表</a> 
                <a  href="{:url('clearall')}" form="#export-form" class="confirm btn btn-danger btn-del btn-disabled ajax-post"><i class="fa fa-trash"></i> 清空数据重新开站</a><span id="selectedChks">已选择<strong></strong>记录</span>
                </div>
                <!-- /.toolbar -->
              </div>
            </div>

</div>
<!-- /.panel-tool -->
    <div class="tab-content" id="contents">
              <form id="export-form" class="tables" method="post" action="{:url('export')}">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                     <th style="text-align:center;vertical-align: middle; width:5%">
                      <label class="pretty success">
	                   <input type="checkbox" id="checkall" class="delcheckall"> 
	                    <label><i class="mdi mdi-check"></i></label>
	                  </label>
                      </th>
                    <th style="text-align:center;vertical-align: middle;">表名</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">备注</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">数量</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">大小</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">碎片</th>
                    <!--<th style="text-align:center;vertical-align: middle;">创建时间</th>-->
                    <th style="text-align:center;vertical-align: middle;">状态</th>
                    <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                 </thead>                
               <tbody>
               {volist name="list" id="table"}
               <tr>
                <td class="bs-checkbox" style="text-align:center;vertical-align:middle; font-size:14px">
                <label class="pretty success">
                <input name="tables[]" type="checkbox" value="{$table.name}" id="checkbox"> 
	            <label><i class="mdi mdi-check"></i></label>
	            </label>
                </td>                   
                  <td align="center">{$table.name}</td>
                  <td align="center" class="hidden-xs">{$table.comment}</td>
                  <td align="center" class="hidden-xs">{$table.rows}</td>
                  <td align="center" class="hidden-xs">{$table.data_length|format_bytes}</td>
                   <td align="center" class="hidden-xs">{$table.data_free|format_bytes}</td>
                  <!--<td align="center">{$table.create_time}</td>-->
                  <td align="center" class="info">未备份</td>
                  <td align="center"><a class="btn btn-info btn-xs ajax-post" href="{:url('optimize',array('tables'=>$table['name']))}"><i class="fa fa-futbol-o"></i> 优化表</a>&nbsp; <a class="btn btn-warning btn-xs ajax-post" href="{:url('repair',array('tables'=>$table['name']))}"><i class="fa fa-exclamation-circle"></i> 修复表</a>&nbsp; <a class="confirm btn btn-danger btn-xs ajax-post" href="{:url('clear',array('tables'=>$table['name']))}"><i class="fa fa-trash-o"></i> 清空表</a></td>  
                  
              </tr>
{/volist} 
            </tbody>
                </table>
              </form>
            </div>    
         </div>
         <!-- /.panel-body --> 
        </div>
        </div>
        </section>
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
     zanpian.cms.data();						   
});	
</script>
</body>
</html>
